﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StudyCenter.aspx.cs" Inherits="ExaminationSys.View.Student.StudyCenter" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>学习中心</title>
     
</head>
<body style="margin:0; padding:0">
    <form id="form1" runat="server">
    <div id="sub_page_main">
              <%  foreach (var sectionInte in SectionInfoIntegratedList)
                  {
                      htmlStr.Append("<div class=\"item\">");
                      htmlStr.Append("<div style=\"   width:17%;text-align:center; float: left;height:150px;border-top: 1px solid #99BCE8; border-left:1px solid #99BCE8; padding:20px 0 0 20px;\" class=\"col1\">");
                      htmlStr.Append("<img  src=" + sectionInte.Img + " style=\"float:left;width: 120px; height: 100px\"/>");
                      htmlStr.Append("<span style=\"float:left;margin:5px 0 0 40px;\">" + sectionInte.Name + "</span>");
                      htmlStr.Append(" </div>");
                      htmlStr.Append("  <div  style=\" width:40%; float: left;height:150px;border-top: 1px solid #99BCE8; border-left:1px solid #99BCE8; padding:20px 0 0 20px;\"  class=\"col2\">");

                      if (sectionInte.SectionTypeID == 1) //学习栏目
                      {
                          htmlStr.Append("<span>您还没有登录过该栏目</span> <br /> ");
                          if (sectionInte.PaperInfolist != null && sectionInte.PaperInfolist.Count!=0)
                          {
                              foreach (var paper in sectionInte.PaperInfolist)
                              {
                                  htmlStr.Append("<span>您还没有完成该栏目的[" + paper.Title + "]</span>");
                                  htmlStr.Append("<a href='JoinExamination.aspx?PaperID=" + paper.ID + "'> 点击进行测试</a> <br />");
                              }
                          }
                          else{
                              htmlStr.Append("<span>此栏目还没有设置测试试卷</span>");
                          }
                         
                      }
                      else if (sectionInte.SectionTypeID == 2)
                      {
                          if(!string.IsNullOrEmpty(sectionInte.LinkUrl)){
                             htmlStr.Append("<a target=\"blank\" href='" + sectionInte.LinkUrl + "'> 点击进行访问</a>");
                          }
                          else{
                                htmlStr.Append("<span>此栏目没有设置连接</span>");
                          }
                      }
                      htmlStr.Append("</div>");

                      htmlStr.Append("<div  style=\"width:10%;text-align:center; border-right:1px solid #99BCE8;float: left;height:150px;border-top: 1px solid #99BCE8; border-left:1px solid #99BCE8; padding:20px 0 0 20px;\"  class=\"col3\">");
                      if(sectionInte.SectionTypeID == 1)
                      {
                        htmlStr.Append("<a href=\"#\">测试历史</a>");
                      }
                      htmlStr.Append(" <br />");
                      htmlStr.Append(" </div>");
                      htmlStr.Append(" </div>");
                      htmlStr.Append("  <div style=\"clear:both;\" class=\"clear\">");
                      htmlStr.Append("</div>");

                  }
               %>
                
              <%=htmlStr.ToString() %>
    </div>
    </form>
</body>
</html>
